/*
 *  Openpicus Bluetooth Module Interface
 *  By Rolf Ziegler
 *  Feb. 2014
 *
 *  Setup Openpicus bluetooth interface
 */
#include <p18cxxx.h>

void InitBT600(unsigned char speed)
{
    TRISCbits.TRISC7=1; // RX
    TRISCbits.TRISC6=0; // TX

    SPBRG=speed;

    TXSTA = 0x24;       // TX enable BRGH=1
    RCSTA = 0x90;       // continuous RX
    BAUDCON = 0x00;     // BRG16 = 0

}//end InitializeUSART

